package com.guijianpan.system.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.guijianpan.system.domain.Role;
import com.guijianpan.system.repository.RoleRepository;

@Service
public class RoleService {
	
	@Autowired
	private RoleRepository roleRepository;

	@Transactional
	public Role save(Role Role) {
		return roleRepository.save(Role);
	}

	public List<Role> findAll() {
		return (List<Role>) roleRepository.findAll();
	}

	public Role findOne(Long id) {
		return roleRepository.findOne(id);
	}

}
